Feature/add sdkwrapper identifier - #625
Conversation
| } | ||
|
|
||
| + (void)setWrapperIdentifier:(nullable NSString *)wrapperIdentifier { | ||
| [GIDSignInPreferences setWrapperIdentifier:wrapperIdentifier]; |
There was a problem hiding this comment.
Do we want to enforce the "set once" language in property's doc comment?
| // Both tokens expired 10 seconds ago. | ||
| GIDGoogleUser *user = [self googleUserWithAccessTokenExpiresIn:-10 idTokenExpiresIn:-10]; | ||
|
|
||
| XCTestExpectation *expectation = [self expectationWithDescription:@"Callback is called"]; |
There was a problem hiding this comment.
Can we make the description more descriptive? I know the pattern in the library is to use "Callback is called," but I've had trouble in past with debugging failed tests when I see a wall of that output. It's hard to find which callback wasn't called.
|
|
||
| os_unfair_lock_lock(&gWrapperIdentifierLock); | ||
| NSString *current = gWrapperIdentifier; | ||
| if (current != nil && ![current isEqualToString:sanitized]) { |
There was a problem hiding this comment.
Ah, the "set once" enforcement is here. That's a little surprising, but I think I understand the reasoning. I don't know if this can be addressed, but I do still feel like it's confusing to see the doc comment on the property of the other class, and then for the actual enforcement to be here. ¯_(ツ)_/¯
Probably no big deal. Feel free to close.
A small number of clients bundle GoogleSignIn-iOS with their own SDKs. To ensure that the way we understand adoption of the SDK is accurate, we'd like to allow those bundlers to say "Hi, this clientID may be App123, but I, Bundler0, am handling it on their behalf".
This is entirely optional and represents no functional change to the way authorization requests are handled on the backend.